
const {DataTypes} = require('sequelize')
const seq = require('../db/seq')
const User = seq.define('zd_user', {
    user_name: {
        type: DataTypes.STRING,
        allowNull: true,
        unique: true,
        comment: "用户名不为空"
    },
    password: {
        type: DataTypes.CHAR(64),
        allowNull: false,
        unique: false,
        comment: "密码"
    },
    is_admin: {
        type: DataTypes.BOOLEAN,
        allowNull: false,
        defaultValue: 0,
        comment: "是否管理员"
    },

})
// 强制创建数据表
// User.sync({ force: true })
module.exports = User